<template>
    <div style="border-bottom: rgba(81,101,205, 0.6) 1px solid ;">
      <el-form ref="airConditioningEquipmentData"  :rules="airConditioningEquipmentRules"  label-width="100px" label-suffix	=":" align="left"  style="margin-top: 1.5vh;color: #FFFFFF;"  :inline="true" :model="airConditioningEquipmentData" >

        <el-form-item label="时间段" required>
          <el-time-picker style="width: 300px;"
            is-range
            v-model="airConditioningEquipmentData.begin_time"
            range-separator="至"
            value-format="HH:mm:ss"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            placeholder="选择时间范围">
          </el-time-picker>
        </el-form-item>

        <el-form-item  label="最高温度" prop="max_temperature">
          <el-input style="width: 10vh;" v-model="airConditioningEquipmentData.max_temperature">
            <i slot="suffix" style="font-style:normal;margin-right: 10px;">℃</i>
          </el-input>
        </el-form-item>

        <el-form-item  label="最低温度" prop="min_temperature">
          <el-input style="width: 10vh;" v-model="airConditioningEquipmentData.min_temperature">
            <i slot="suffix" style="font-style:normal;margin-right: 10px;">℃</i>
          </el-input>
        </el-form-item>

        <el-form-item label="模式">
          <el-radio-group v-model="airConditioningEquipmentData.mode">
            <el-radio  label="制冷"></el-radio>
            <el-radio  label="制热"></el-radio>
          </el-radio-group>
        </el-form-item>

        <el-form-item label="日期">
          <el-radio-group v-model="airConditioningEquipmentData.date">
            <el-radio label="工作日"></el-radio>
            <el-radio label="非工作日"></el-radio>
          </el-radio-group>
        </el-form-item>

        <el-form-item>
          <el-button  size="small" type="primary"  icon="el-icon-connection"  @click="cloneAirConditioningEquipment">复制</el-button>
          <el-button  size="small" type="danger" icon="el-icon-delete" @click="removeAirConditioningEquipment" >删除</el-button>
        </el-form-item>

      </el-form>
    </div>


</template>

<script>


  export default {
    name: 'airConditioningEquipmentTemplate',
    components: {

    },
    data() {
      return {

        airConditioningEquipmentRules: {
          begin_time: [
            { required: true, message: '请输入开始时间', trigger: 'blur' },
            { min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'blur' }
          ],
          end_time: [
            { required: true, message: '请输入结束时间', trigger: 'blur' },
            { min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'blur' }
          ],
          max_temperature: [
            { required: true, message: '请输入最高温度', trigger: 'blur' },
            { min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'blur' }
          ],
          min_temperature: [
            { required: true, message: '请输入最低温度', trigger: 'blur' },
            { min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'blur' }
          ],
          mode: [
            { required: true, message: '请输入模式', trigger: 'blur' },
            { min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'blur' }
          ],
          date: [
            { required: true, message: '请输入日期', trigger: 'blur' },
            { min: 1, max: 10, message: '长度在 1 到 10 个字符', trigger: 'blur' }
          ]
        }
      }
    },
    props: {
      airConditioningEquipmentData : {
        set_id :'',//空调设备id
        begin_time :'', //开始时间
        end_time :'', //结束时间
        max_temperature :'', //最高温度
        min_temperature :'', //最低温度
        mode :'', //模式
        date :''  //日期
      },
      index : ''
    },
    mounted() {

    },
    methods: {

      /* 复制空调设备信息 */
      cloneAirConditioningEquipment : function(){
        this.$emit('cloneAirConditioningEquipment', this.index);
      },
      /* 删除空调设备信息 */
      removeAirConditioningEquipment : function(){
        this.$emit('removeAirConditioningEquipment', this.index);
      },



    }
  }
</script>



<style scoped >


  /deep/ .el-dialog, .el-pager li {
    background: #202B61;
    -webkit-box-sizing: border-box;
  }

  /deep/ .el-date-editor .el-range-separator {
    padding: 0 5px;
    line-height: 32px;
    width: 5%;
    color: #FFF;
  }

  /deep/ .el-date-editor .el-range-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    outline: 0;
    padding: 0;
    width: 39%;
    color: #FFFFFF;
    background: #161E43;
  }


  /deep/ .el-radio {
    color: #FFFFFF;
    cursor: pointer;
    margin-right: 30px;
  }

  /deep/ .el-dialog__header {
    padding: 20px 20px 10px;
    color: #FFF;
    background: #374590;
  }

  /deep/ .el-dialog__title {
    line-height: 15px;
    font-size: 16px;
    color: #FFF;
  }

  /deep/ .el-input__inner {
    -webkit-appearance: none;
    background-color: #161E43;
    background-image: none;
    border-radius: 4px;
    border: 1px solid #161E43;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #4891EE;
    display: inline-block;
    font-size: inherit;
    height: 40px;
    line-height: 40px;
    outline: 0;
    padding: 0 15px;
    -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    width: 100%;
  }


  /deep/ .el-input__inner {
    -webkit-appearance: none;
    background-color: #161E43;
    background-image: none;
    border-radius: 4px;
    border: 1px solid #161E43;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #FFFFFF;
    display: inline-block;
    font-size: inherit;
    height: 40px;
    line-height: 40px;
    outline: 0;
    padding: 0 15px;
    -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
    width: 100%;
  }

  /deep/ .el-form-item__label {
    text-align: right;
    vertical-align: middle;
    float: left;
    font-size: 14px;
    color: #FFF !important;
    line-height: 40px;
    padding: 0 12px 0 0;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }


  .box1{
    position: relative;
    width: 100%;
    background: inherit;
    background-color: rgba(45, 61, 136, 0.6);
    color: white;
    min-height: 45vh;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
    border-color: rgba(226, 239, 249, 1);
    border : none;
    border-radius: 5px;
    -webkit-box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.345098039215686);
    box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.345098039215686);
    font-size: 2vh;
    text-align: right;
  }

  .box2{
    position: relative;
    width: 100%;
    min-height: 25vh;
    margin-top:0.5%;
    background: inherit;
    background-color: rgba(45, 61, 136, 0.6);
    color: white;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
    border-color: rgba(226, 239, 249, 1);
    border : none;
    border-radius: 5px;
    -webkit-box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.345098039215686);
    box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.345098039215686);
    font-size: 2vh;
    text-align: right;
  }




  .title{
    width:100%;
    height:5vh;
    line-height: 5vh;
    background:rgba(55, 69, 144, 1);

    font-weight:bold;
    background: inherit;
    -webkit-box-shadow: none;
    box-shadow: none;
    font-family: 'Arial Negreta', 'Arial Normal', 'Arial';
    font-weight: 700;
    font-style: normal;
    font-size: 1.5vh;
    color: #FFFFFF;
    text-align: left;
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
    border-color: rgba(55, 69, 144, 1);
    border-radius: 1px;
    -moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.345098039215686);
    -webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.345098039215686);
    box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.345098039215686);
  }


</style>
